<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<%@ page import="claybird.dom.Handicap" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Edition Personne</title>
</head>
<body>
${personne.name}  ${personne.forName}
<c:choose>
	<c:when test="${not empty personne}">
		<form action="/personne/addHandicap" method="post">
			<input type="hidden" name="id" value="${personne.id}"/>
			<div>annee:<input type="text" name="year" value="${personne.getLastHandicap().year}"/></div>
			<div>handicap:<input type="text" name="handicap" value="${personne.getLastHandicap().previousHandicap}"/></div>
			<select name="categorie">
			<c:choose>
				<c:when test="${personne.getLastHandicap().categorie=='candidat'}">				
					<option selected="selected" value="candidat">candidat</option>
				</c:when>
				<c:otherwise>
					<option value="candidat">candidat</option>
				</c:otherwise>
			</c:choose>
			<c:choose>
				<c:when test="${personne.getLastHandicap().categorie=='amateur'}">				
					<option selected="selected" value="amateur">amateur</option>
				</c:when>
				<c:otherwise>
					<option value="amateur">amateur</option>
				</c:otherwise>
			</c:choose>
			
			<c:choose>
				<c:when test="${personne.getLastHandicap().categorie=='chasseur'}">				
					<option selected="selected" value="chasseur">chasseur</option>
				</c:when>
				<c:otherwise>
					<option value="chasseur">chasseur</option>
				</c:otherwise>
			</c:choose>
			<c:choose>
				<c:when test="${personne.getLastHandicap().categorie=='tireur'}">				
					<option selected="selected" value="tireur">tireur</option>
				</c:when>
				<c:otherwise>
					<option value="tireur">tireur</option>
				</c:otherwise>
			</c:choose>
			<c:choose>
				<c:when test="${personne.getLastHandicap().categorie=='pro'}">				
					<option selected="selected" value="pro">pro</option>
				</c:when>
				<c:otherwise>
					<option value="pro">pro</option>
				</c:otherwise>
			</c:choose>
			<c:choose>
				<c:when test="${(personne.getLastHandicap().categorie=='invite')||personne.guest}">				
					<option selected="selected" value="invite">invite</option>
				</c:when>
				<c:otherwise>
				<option value="invite">invite</option>
				</c:otherwise>
			</c:choose>
			</select>
			<input type="submit" value="" class="save"/>
		</form>
	</c:when>
</c:choose>

</body>
</html>